package vip.zcn.mrn.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import vip.zcn.mrn.service.CouponService;


/**
 * 优惠券控制器
 * 功能：处理优惠券相关的请求
 * 作者：张灿能
 * 创建时间：2025-08-04
 */
@RestController
@RequestMapping("/coupon")
@RequiredArgsConstructor
public class CouponController {
    private final CouponService couponService;

    @PostMapping("/grab")
    public String grab(@RequestParam String userId) {
        return couponService.grabCoupon(userId);
    }
}